<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
</head>
<body>
<button onclick="send()">点击</button>
<button onclick="getCookie()">点击登录拿到cookie</button>
<script>
  function send(){
    $.ajax({
      url:"http://localhost:8080/hello",
      type:"GET",
      success:function (data) {
        console.log(data);
      },
    });
  }
  function getCookie(){
    $.ajax({
      url:"http://localhost:8080/setCookies",
      type:"GET",
      success:function (data) {
        console.log(data);
      },
    });
  }
</script>
</script>
</body>
</html>